$(function(){
	$(".coll_body").eq(1).show();
	$(".coll_body").eq(1).children('a').eq(0).addClass("active");
	$(".Collapsing").eq(1).children('a').children('span').addClass("rotate");
	$(".Collapsing").eq(1).click(function(){
		$(".Collapsing").eq(1).toggleClass("active");
		$(this).children('.coll_body').children('a').eq(0).toggleClass("active");
	})
})
//	预警配置列表
	var pageSize = 15;
	var currentPage = 1; 
	ajaxTest(currentPage);
	
	function ajaxTest(currentPage) {
		$.ajax({
				type:"post",
				url:serverIP+"/user/printSet/list",
				dataType:"json",
				xhrFields: {
	                withCredentials: true    // 设置sessionId相同
	            },
	            data: {page:currentPage},
				success:function (data) {
					if(data.code==0){
						let result=data.data.list.result;
						var strVar = "";
						result.map(function(u){
							strVar += "              <tr>\n";
						    strVar += "                <td>"+u.printSetId+"<\/td>\n";
						    strVar += "                <td>"+u.brandName+"<\/td>\n";
						    strVar += "                <td>"+u.modelName+"<\/td>\n";
						    strVar += "                <td>"+u.kSum+"<\/td>\n";
						    strVar += "                <td>"+u.cSum+"<\/td>\n";
						    strVar += "                <td>"+u.mSum+"<\/td>\n";
						    strVar += "                <td>"+u.ySum+"<\/td>\n";
						    strVar += "             <\/tr>";
						})
						$('.print-tbody').html(strVar);
					//分页
						$("#page").paging({
							pageNo: data.data.list.curPage,
							totalPage: data.data.list.totalPage,
							totalSize: data.data.list.totalRow,
							callback: function(currentPage) {
								ajaxTest(currentPage); 
							}
						});
					}else{
						alert(data.msg);
						window.location.href="login.html";
					}/*if-End*/
				}
		})
	}
//监听浏览器窗口变化
window.onresize = function(){
	var bodyH=$("body").height();
	$(".leftbar").height(bodyH-45+"px");
	$(".content").height(bodyH-45+"px");
	$(".admin").height($(".content").height()-45+"px");
}